<template>
  <div class="perfume">
    <van-nav-bar
      title="香水"
      left-arrow
      @click-left="onClickLeft"
    />
    <div class="item">
        <div class="goodsDiv" v-for="(value,key,index) in allPerfume" :key="allPerfume.key">
            <div class="card" @click="cardClick(index,item)">
                <div class="head">
                    <img src="@/assets/img/find/ae3652a386e6bc1b42fc048be31bd739dcb39c353d5d5-MpoHmm_fw658.png" alt="">
                    <p>admin</p>
                </div>
                <div class="title">
                    <div class="van-ellipsis"><h3>香奈儿可可小姐xxxxxxxxxxxxxxxxx</h3></div>
                    <div class="van-multi-ellipsis--l2"><p>香奈儿可可小姐馥郁香水留香时间长，非常有女人味，适xxxxxxxxxx</p></div>
                    <span>❤ 32</span>
                </div>
                
            </div>
        </div>
    </div>
  </div>
</template>

<script setup>
import axios from 'axios'
import {ref } from 'vue'
import {useRouter} from 'vue-router'
import details from './details.vue'
import {getArticleList,} from './indexJS/findTalk'

const params = ref({
    page:1,
    limit:5,
    topicId:1,
    key:'女人'
})

const allPerfume = ref(params)
getArticleList().then(res=>{
    allPerfume.value=res.page.list
    console.log(allPerfume.value);
})

const onClickLeft = () => history.back();
const router = useRouter()
const cardClick = () =>{
    router.push('/details')
}
</script>

<style lang="scss" scoped>
.goodsDiv{
    width: 337px;
    height: 366px;
    margin: 20px 20px;
    // background-color: aquamarine;
    background-image: url('@/assets/img/find/fa105267470260a73703bb8a618c0656.png');
    background-size: 337px 300px;
    background-repeat: no-repeat;
    display: flex;
    justify-content: end;
    flex-direction: column;
    align-items: center;
    
    .card{
        width: 240px;
        height: 121px;
        background-color: white;
        display: flex;
        justify-content: space-between;
        // flex-direction: column;
        align-items: center;
        border-radius: 10px;
        box-shadow: 1px 1px 5px #909090;
        .head{
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            width: 74px;
            height: 84px;
            img{
                width: 60px;
                height: 60px;
                border-radius: 50%;
            }
        }
        .title{
            display: flex;
            flex-direction: column;
            // white-space:nowrap;
            text-overflow:ellipsis;
            justify-content: space-around;
            overflow:hidden;
            width: 133px;
            height: 91px;
            h3{
            text-overflow:ellipsis;
            justify-content: space-around;
            overflow:hidden;
                font-size: 14px;
            }
            p{
                font-size: 10px;
                color: #666666;
            }
            span{
                font-size: 10px;
                margin-left: 80px;
                color: #666666;
            }
        }
    }
}
</style>